package LeetCode;

class isPowerOfTwo {
    public boolean isPowerOfTwo(int n) {
        int result = 1;

        while(n > 1){
            if(n % 2 == 1)
                return false;
            n  = n >> 1;
        }
        if(result == n)
            return true;
        return false;
    }
}